<?php
/**
 * system_opt_log 数据表模型
 * @author  yangjian <yangjian102621@gmail.com>
 */

namespace models;

use herosphp\filter\Filter;
use herosphp\model\C_Model;

class SystemOptLogModel extends C_Model {

    public function __construct() {

        //创建model对象并初始化数据表名称
        parent::__construct('system_opt_log');

        //设置表数据表主键，默认为id
        $this->setPrimaryKey('id');
        $this->autoPrimary = false;
        
        $this->filterMap = array(
            'content' => array(Filter::DFILTER_STRING, array(5, 255), Filter::DFILTER_SANITIZE_TRIM | Filter::DFILTER_MAGIC_QUOTES,
                array("require" => "日志内容不能为空.", "length" => "日志长度必需在5,255之间.")),
        );
    }
} 